alias lsa='ls -lah'
alias px='pwd | xclip' 
alias ..='cd .. 2>/dev/null || cd "$(dirname $PWD)"'
alias lsc='ls | wc -l'
mouse='sudo modprobe 842'
alias anydesk='anydesk && xmodmap ~/.Xmodmap'
alias zq='zathura $HOME/kit/pdf/Quran/Quran.pdf &'
alias jbs='JEKYLL_ENV=production bundle exec jekyll serve'
alias getip="curl -s checkip.dyndns.org | sed -e 's/.*Current IP Address: //' -e 's/<.*$//'"
alias du='du -h'
alias youtube='google-chrome-stable --app=https://youtube.com &'
alias colorize='toilet --gay -f term $@'
alias xquery='xdg-mime query filetype $1'
alias c='xclip-copyfile'
alias p='xclip-pastefile'
alias d='xclip-cutfile'
alias awr="awesome-client 'awesome.restart()'"
alias z='zathura $1'
alias cpwd='pwd | tr -d "\n" | xsel -ib'
alias info='info --vi-keys'
alias vac='$EDITOR $HOME/.new_vimrc'
alias tmp='mkdir /tmp/$$ ; cd /tmp/$$'
alias thumbs='sxiv -atrq "$@"'
alias untmp='rm -rf /tmp/$$'
alias dox='cd ~/dos'
alias ipp='curl ipinfo.io/ip'
alias img="imgur-screenshot $@"
alias mwx='mplayer -vo fbdev2 -vf scale=931:580 -geometry 978:4 -ni $1'
alias ta='\tmux a -t'
alias sct='termite -t 'scratchpad' &'
alias sxt='xfce4-terminal -T scratchpad &'
alias ncm='ncmpcpp 2>/dev/null'
alias grep='grep --color=auto'
alias egrep='egrep --color=auto'
alias un='$EDITOR /home/ak/lab/notes/shell/zsh'
alias ipy='ipython3'
alias tmux='tmux has-session -t $USER || tmux new-session -s $USER &&  tmux -2 attach-session -t $USER'
alias sc='systemctl --user'
alias py='python3'
alias cdw='cd ~/git/dwm; ls'
#alias pyc='export _JAVA_AWT_WM_NONREPARENTING=1 ; $HOME/bin/pycharm/bin/pycharm.sh $1'
alias cdc='cd $HOME/cfg'
alias chkill="ps ux | grep '[C]hrome --type=renderer' | grep -v extension-process | tr -s ' ' | cut -d ' ' -f2 | xargs kill"
alias pak='cd $HOME/git/ports/ak'
alias psgrep='ps aux | grep $(echo $1 | sed "s/^\(.\)/[\1]/g")'
alias tkill='\tmux kill-session -a'
alias vte='$EDITOR ~/.config/termite/config'
alias pgs='prt-get search'
alias pt='sudo prt-get'
alias pgf='prt-get fsearch'
alias pgi='sudo prt-get install'
alias ltd='ls *(m0)' # files and dirs modified in the last day
alias lt='ls *(.m0)' # files modified in last day (no dirs)
alias lnew='ls *(.om[1,3])' # list three newest
alias lsrdir='ls -d *(/om[1])'
alias lh='ls -d .*' # only hidden files
alias pa='sudo pkgadd'
alias ytvid='youtube-dl --restrict-filenames -o "~/mus/vid/%(title)s_%(width)sx%(height)s_%(upload_date)s.%(ext)s"'
alias ytaudio='youtube-dl --restrict-filenames --extract-audio -o "~/mus/%(title)s_%(width)sx%(height)s_%(upload_date)s.%(ext)s"'
alias sit='cd ~/git/mysite/'
alias reboot='sudo reboot'
alias api='sudo apt install --yes -V'
alias aps='apt search $1'
alias spy='lsof -i -P +c 0 +M'
alias netlist='lsof -i -P | grep LISTEN'
alias apg='sudo apt purge -V'
#alias mk='$EDITOR $HOME/lab/notes/python/learnPython'
alias xq='xbps-query'
alias xi='sudo xbps-install'
alias xr='sudo xbps-remove'
alias vx='$EDITOR ~/.Xresources'
alias vg='$EDITOR ~/.config/git/config'
alias vmc='$EDITOR ~/.config/nvim/init.vim'
alias fst='sudo $EDITOR /etc/fstab'
#alias u="urxvt -pixmap '`find ~/pix/wall/ -name '*.jpg' | sort -R | head -n 1`;style=tiled' -T myKitten &" 
#alias u='termite -t myKitten &'
#alias mk='sudo $EDITOR /etc/portage/make.conf'
#alias py='pyscript'
alias mutc='$EDITOR ~/.config/mutt/muttrc'
alias msc='mbsync -VXa'
#alias termux='terminator -g ~/.config/terminator/configfortermux'
alias ssr='simplescreenrecorder --start-hidden --no-systray'
#alias nv='sudo $EDITOR /etc/nixos/configuration.nix'
#alias wtc="qutebrowser -s content.headers.user_agent 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/58.0.3029.110 Safari/537.36' web.whatsapp.com &"
alias cdm='cd ~/mus'
alias xf='xfce4-terminal'
alias lf='leafpad'
alias gd='git diff'
alias cD='cd ~/sys/downloads'
alias ds="dirs -v | head -n 10"
alias lla='ls -la'
alias lc='ls | wc -l'
#alias less=/usr/share/vim/vim81/macros/less.sh
#alias less=$PAGER
#alias zless=$PAGER
alias chmod='chmod --preserve-root'
alias vc='$EDITOR ~/.vimrc'
alias g='git'
alias ter='\tmux a -r -t'
alias tl='\tmux ls'
#alias git='hub'
alias gs='git status'
alias 'apar'='sudo apt autoremove -V'
alias xp='xrdb -merge ~/.Xresources'
alias cdv='cd ~/dev'
alias gu='git push'
alias vw='$EDITOR $HOME/.config/sway/config'
alias top='htop'
alias ga='git add'
alias cdd='cd ~/.cfg'
alias q='exit'
alias sm='sudo mount'
alias fk='$EDITOR ~/.zsh/functions'
alias f='fish'
alias plz='sudo $(fc -ln -1)'
alias rfz='source $HOME/.zshrc'
alias vz='$EDITOR $HOME/.zshrc'
alias rr='fc -s'
alias wc='wc -l'
alias df='df -h'
alias S='systemctl'
alias ss='sudo systemctl'
alias cdg='cd $HOME/git'
alias clock='ncmpcpp -s clock'
alias cm='mutt 2>/dev/null'
alias vp='$EDITOR $HOME/.config/polybar/config'
alias cp='cp -i'
alias mv='mv -i'
#alias pb="curl -sF c=@- 'https://ptpb.pw/?u=1' | xsel"
alias mi='mid3v2'
alias mnv='mpv --no-video'
alias mp='mpv --loop-file'
alias mq='mpv --really-quiet --speed=0.50 --loop-file'
alias ms='mpv --really-quiet --shuffle'
alias hr='printf $(printf "\e[$(shuf -i 91-97 -n 1);1m%%%ds\e[0m\n" $(tput cols)) | tr " " ='
alias starwars='telnet towel.blinkenlights.nl'
alias e='evince'
alias sv='sudo $EDITOR'
alias aws='v $HOME/.config/sxhkd/sxhkdrc'
alias rf='source $HOME/.bashrc'
alias a='cd $HOME/.config'
alias sk='autoscript'
alias alis='$EDITOR ~/.zsh/custom-alias'
alias yt='cd $HOME/mus/ && youtube-viewer && cd -'
alias v3='$EDITOR $HOME/.config/i3/config'
# Install the package only if its not updated/alread installed
alias si='sudo pacman -S --needed'
# Remove the package
alias sr='sudo pacman -R'
# Remove the package with dependencies not required by other packages too.
alias srs='sudo pacman -Rs'
# Remove the package, dependencies and also those who depend on it
alias srsc='sudo pacman -Rsc'
# Remove the package with no .pacsave configurations being left.
alias srn='sudo pacman -Rn'
# Update the system
alias update='sudo pacman -Syu'
# Get info about a package
alias ssi='pacman -Si'
# Same thing with local packages
alias sqi='pacman -Qi'
# Query local packages
alias sq='pacman -Qs'
# Search a package
alias pS='pacman -Ss'
# Also display modified and backed up files
alias sqii='pacman -Qii'
# Files installed by package
alias sqd='pacman -Ql'
# Same thing for a remote package
alias sqr='pacman -Fl'
# Verify presence of files installed by a package
alias sqk='pacman -Qk'
# Query a file in the filesystem belongs to which package
alias sqo='pacman -Qo'
# Same thing for a remote package
alias sqor='pacman -F'
# Check orphan packages
alias sor='pacman -Qdt'
# List packages installed explicitly
alias sde='pacman -Qet'
# Clean cache
alias sC='sudo pacman -Scc'
# Download a package without installing it 
alias sdw='sudo pacman -Sw'
# Install local package
alias sil='sudo pacman -U'
alias awq='v $HOME/.config/qtile/config.py'
alias awb='v $HOME/.config/bspwm/bspwmrc'
alias br='$EDITOR $HOME/.config/bspwm/external_rules'
alias rfb='bash $HOME/.config/bspwm/bspwmrc'
alias cdb='cd $HOME/.config/bspwm'
alias awx='$EDITOR $HOME/.config/sxhkd/sxhkdrc'
alias rfi='i3 restart'
alias x='xdg-open'
alias lf='leafpad'
alias cfg-cava='$EDITOR $HOME/.config/cava/config'
alias lilbak='cmus-remote -k -10'
alias lilfor='cmus-remote -k +10'
alias bigbak='cmus-remote -k -120'
alias bigfor='cmus-remote -k +120'
alias pup='bash $HOME/.config/polybar/launch.sh'
alias cdi='cd $HOME/.config/i3/'
alias cdp='cd $HOME/lab/pcc'
alias ll='ls -l'
alias lss='ls -lh'
alias k='clear'
alias wars='telnet towel.blinkenlights.nl'
alias moon='curl -sL http://wttr.in/moon | head -n-4'
alias mount='mount | column -t'
alias scrot='import png:- | xclip -selection c -t image/png'

# zsh global functions
alias -g null="2>&1 >/dev/null"
